package First;

/**
 * Created by msingh on 2014-06-27.
 */
public class UseOf_this {
    int x;
    int y;

    public UseOf_this(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public static void main(String args[]) {
        UseOf_this firstval = new UseOf_this(1, 2);
        System.out.println("Value of x when this keyword is not used: " + firstval.x);
        System.out.println("Value of y when this keyword is not used: " + firstval.y);

        UseOf_this secondval = new UseOf_this(3, 4);
        System.out.println("Value of x when this keyword is used: " + secondval.x);
        System.out.println("Value of y when this keyword is used: " + secondval.y);


        }

}
